
#import <QuartzCore/QuartzCore.h>
#import "UINavigationItem+Customization.h"

@implementation UINavigationItem (Customization)

- (void)customizeTitleInNavigationBarWithHeight:(NSInteger)height
{
    UILabel* titleLabel = [[UILabel alloc] init];
    titleLabel.lineBreakMode = UILineBreakModeTailTruncation;
    titleLabel.backgroundColor = [UIColor clearColor];
    titleLabel.text = self.title;
    titleLabel.font = [UIFont fontWithName:@"HelveticaNeue-Bold" size:20.0];
    titleLabel.textColor = [UIColor whiteColor];
    titleLabel.layer.shadowColor = [UIColor blackColor].CGColor;
    titleLabel.layer.shadowOpacity = 0.1;
    titleLabel.layer.shadowRadius = 0;
    titleLabel.layer.shadowOffset = CGSizeMake(0.0f, -0.9f);
    [titleLabel sizeToFit];
    self.titleView = titleLabel;
}

@end
